﻿using Core.API.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Api.Models
{

    #region 用户信息
    public class UserModel
    {
        public int UserID { get; set; }

        public string Account { get; set; }

        public string UserName { get; set; }

        //性别(0未知，1男，2女)
        public int SexID { get; set; }

        public string Birthday { get; set; }

        public int AvatarId { get; set; }

        public string Avatar { get; set; }

        public string PhoneNo { get; set; }

        public string Email { get; set; }

    }
    #endregion

    #region 用户信息
    public class UsersModel
    {
        public int UserID { get; set; }

        public string Account { get; set; }

        public string UserName { get; set; }

        //性别(0未知，1男，2女)
        public int SexID { get; set; }

        public string Birthday { get; set; }

        public string Avatar { get; set; }

        public string PhoneNo { get; set; }

        public string Email { get; set; }

        public int AccountIsAllowUpdate { get; set; }

    }
    #endregion

    #region 上传头像
    public class FaceEntity
    {
        public int AvatarId { get; set; }
        public string Avatar { get; set; }

        public FaceEntity(int avatarId, string addr)
        {
            AvatarId = avatarId;
            Avatar = addr;
        }
    }
    #endregion


    #region 用户登录信息
    public class UserLoginModel
    {

        public string Token { get; set; }

        public int ExpiredTime { get; set; }

        public Object User { get; set; }
    }
    #endregion

    #region 程序信息

    public class RespProgramModel
    {
        public int Id { get; set; }

        public string Title { get; set; }

        public string Code { get; set; }

        //public DateTime UpdateDateTime { get; set; }

    }
    #endregion

    #region 学生证信息
    public class CardInfoEntity
    {
        /// <summary>
        /// 证件ID
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 参数版本号
        /// </summary>
        public int ParaVer { get; set; }

        /// <summary>
        /// 号码版本号
        /// </summary>
        public int PhoneVer { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string PhoneNo { get; set; }

        /// <summary>
        /// 头像ID
        /// </summary>
        public int AvatarId { get; set; }

        /// <summary>
        /// 电量
        /// </summary>
        public int Batter { get; set; }

        /// <summary>
        /// 免打扰时段
        /// </summary>
        public string NdisturbPara { get; set; }

        /// <summary>
        /// 闹钟参数
        /// </summary>
        public string AlarmPara { get; set; }

        /// <summary>
        /// 定位模式
        /// </summary>
        public string LocationModel { get; set; }

        /// <summary>
        /// 自动开关机
        /// </summary>
        public string AutoSwitch { get; set; }

        /// <summary>
        /// 电话本
        /// </summary>
        public string PhoneList { get; set; }

        /// <summary>
        /// 白名单
        /// </summary>
        public string WhiteList { get; set; }

        /// <summary>
        /// sos
        /// </summary>
        public string SosList { get; set; }

        /// <summary>
        /// 监护人
        /// </summary>
        public List<Guardian> Guardian { get; set; }
    }

    public class Guardian
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public int ID { get; set; }
        public string Name { get; set; }
        public int AvatarId { get; set; }
    }
    #endregion

    #region 证件版本
    public class ParaVerEntity
    {
        public int ParaVer { get; set; }
        public int PhoneVer { get; set; }

        public ParaVerEntity(int paraVer, int phoneVer)
        {
            this.ParaVer = paraVer; this.PhoneVer = phoneVer;
        }
    }
    #endregion

    #region 区域列表
    public class RespAreaListEntity
    {
        public List<AreaNotify> Area { get; set; }
    }

    public class AreaNotify
    {
        /// <summary>
        /// 区域唯一标识
        /// </summary>
        public int AreaID { get; set; }

        /// <summary>
        /// 区域名称
        /// </summary>
        public string AreaName { get; set; }

        /// <summary>
        /// /通知标识0-关闭，1-离开通知，2-进入通知，3-离开
        /// </summary>
        public int NotifyID { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public int VerNo { get; set; }
    }
    #endregion

    #region 区域图形
    public class RespAreaDataEntity
    {
        public int AreaID { get; set; }

        public int VerNo { get; set; }

        public byte[] Para { get; set; }

        public RespAreaDataEntity(int areaID, int verNo)
        {
            this.AreaID = areaID;
            this.VerNo = verNo;
        }

        public RespAreaDataEntity(byte[] data)
        {
            this.Para = data;
        }
    }
    #endregion

    #region 历史轨迹
    public class RespLocationEntity
    {
        /// <summary>
        /// 历史轨迹
        /// </summary>
        public List<PositionEntity> Position { get; set; }
    }

    public class PositionEntity
    {
        public int Lat { get; set; }
        public int Lng { get; set; }
        public int Accuracy { get; set; }
        public string Time { get; set; }
    }
    #endregion

    #region 软件升级
    public class RespUpdateSoftEntity
    {
        public int VerNo { get; set; }
        public string VersionName { get; set; }
        public string Url { get; set; }

        public RespUpdateSoftEntity(int verNo, string name, string url)
        {
            this.VerNo = verNo;
            this.VersionName = name;
            this.Url = url;
        }
    }
    #endregion

    #region LBS定位结果

    public class RespLbsEndity : RespBaseModel
    {
        public int LocationType { get; set; }
        public int CSYS { get; set; }
        public int Lat { get; set; }
        public int Lng { get; set; }
        public int Accuracy { get; set; }

    }
    #endregion

    #region 上传语音结果
    public class ChatUploadResultEntity:RespBaseModel
    {
        public int Result { get; set;}

        /// <summary>
        /// 流水号
        /// </summary>
        public int FlowID { get; set; }

        /// <summary>
        /// 文件ID
        /// </summary>
        public string FileID { get; set; }

        /// <summary>
        /// 下载地址
        /// </summary>
        public string DownUrl { get; set; }
    }
    #endregion
}